home *** CD-ROM | disk | FTP | other *** search
/ Commodore Disk User Volume 1 #6 / Commodore_Disk_User_Vol.1_6_1988_-.d64 / score keeper (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  2KB  |  53 lines

  1. 20 rem on-screen score maintenance utility
  2. 40 rem (c) jb kinley  january 1988
  3. 50 rem place score in variable sc
  4. 60 rem number of lives in li%
  5. 70 rem initialise with sys 49152
  6. 80 rem subsequent calls to sys 49218
  7. 90 rem
  8. 100 if s=0 then s=1:load "skeep.mc",8,1
  9. 450 rem
  10. 470 rem** this program**
  11. 480 rem**is for demonstration only**
  12. 490 rem
  13. 500 blank$=" "
  14. 510 down$="":rem 24 csr downs
  15. 520 poke53280,0:poke53281,0
  16. 530 print"[147]"
  17. 540 m$="[159]on-screen score maintenance":gosub840
  18. 550 m$=blank$:gosub840
  19. 560 m$="[156]by j kinley      january 1988":gosub 840
  20. 570 m$=blank$:gosub840
  21. 580 sys 49152:poke53287,1:rem print score in white
  22. 590 print""left$(down$,12);"[150]this program allows you to display"
  23. 600 print"game scores on-screen"
  24. 610 forsc=1to99999step999:sys49218:next
  25. 620 print"[154]irrespective of screen display mode"
  26. 630 print"[152]and unaffected by background scrolling"
  27. 640 forsc=999999to500000step-12345:sys49218:fors=1to100:next:next
  28. 650 print""down$
  29. 660 forsc=100to2500step100:fors=1to150:next:print:sys49218:next:sys49218
  30. 670 m$="[158]you can also maintain a count of":gosub840
  31. 680 m$="lives remaining":gosub840
  32. 690 fort=1to6:li%=t:sys49218:fors=1to800:next:next
  33. 700 print""down$
  34. 710 fort=1to25:print:sc=int(rnd(0)*1000000):li%=rnd(0)*7:sys49218
  35. 720 fors=1to500:next:next
  36. 730 m$="the score display can be placed":gosub840
  37. 740 m$="[159]anywhere on screen":gosub840
  38. 750 poke53264,(peek(53264)and254)
  39. 760 fort=1to15:x=rnd(1)*231+24:y=rnd(1)*160+50
  40. 770 fors=1to800:next:poke53248,x:poke53249,y:next
  41. 780 poke53269,(peek(53269)and254)
  42. 790 m$="[158]end of demonstration":gosub840
  43. 800 m$="[156]press 'r' to re-run, any key to exit":gosub840
  44. 810 geta$:ifa$=""then810
  45. 820 ifa$="r"then530
  46. 830 end
  47. 840 rem**message scrolling routine**
  48. 850 fort=39to1step-1
  49. 860 ms$=left$(m$,40-t)
  50. 870 print""tab(t)left$(down$,12);ms$;" "
  51. 880 fors=1to100:next
  52. 890 next:return
  53.